package cn.mdx.common.exceptions;

import cn.mdx.common.beans.ResultBean;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartException;


@ControllerAdvice
@CrossOrigin
@RestController
public class ExceptionsHandler {


    @ExceptionHandler(MultipartException.class)
    public ResultBean customGenericExceptionHnadler(MultipartException exception){
        return new ResultBean("文件不能超过10M",ResultBean.FAIL);
    }



}